import axios from '@/utils/request';
const baseOriginURL = process.env.VUE_APP_BASE_ORIGIN + '/iot_device';
const baseProjectOriginURL = process.env.VUE_APP_BASE_ORIGIN + '/iot_project';

// 获取产线列表
const getProductLineList = params => {
  return axios.get(baseOriginURL + '/device/getProductLineList', {
    params
  });
};

// 获取产线设备列表
const getProductLineDeviceList = params => {
  return axios.get(baseOriginURL + '/device/getProductLineDeviceList', {
    params
  });
};

// 获取产线详情
const getProductLineDetails = params => {
  return axios.get(baseOriginURL + '/device/getProductLineDetails', {
    params
  });
};

// 获取所有客户类型
const getCustomerTypeList = params => {
  return axios.get(baseOriginURL + '/device/getCustomerTypeList', {
    params
  });
};

// 获取客户列表
const getCustomerList = params => {
  return axios.get(baseProjectOriginURL + '/project/getCustomerList', {
    params
  });
};

// 获取客户列表-产线
const getSearchCustomerListForApp = params => {
  return axios.get(baseOriginURL + '/device/getSearchCustomerListForApp', {
    params
  });
};

export {
  getProductLineList,
  getProductLineDeviceList,
  getProductLineDetails,
  getCustomerTypeList,
  getCustomerList,
  getSearchCustomerListForApp
};
